Optimal. Leaf size=117 \[ -\frac {i a^5}{12 d (a-i a \tan (c+d x))^3}-\frac {i a^4}{8 d (a-i a \tan (c+d x))^2}-\frac {3 i a^3}{16 d (a-i a \tan (c+d x))}+\frac {i a^3}{16 d (a+i a \tan (c+d x))}+\frac {a^2 x}{4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3487, 44, 206} \[ -\frac {i a^5}{12 d (a-i a \tan (c+d x))^3}-\frac {i a^4}{8 d (a-i a \tan (c+d x))^2}-\frac {3 i a^3}{16 d (a-i a \tan (c+d x))}+\frac {i a^3}{16 d (a+i a \tan (c+d x))}+\frac {a^2 x}{4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 206
Rule 3487
Rubi steps
\begin {align*} \int \cos ^6(c+d x) (a+i a \tan (c+d x))^2 \, dx &=-\frac {\left (i a^7\right ) \operatorname {Subst}\left (\int \frac {1}{(a-x)^4 (a+x)^2} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^7\right ) \operatorname {Subst}\left (\int \left (\frac {1}{4 a^2 (a-x)^4}+\frac {1}{4 a^3 (a-x)^3}+\frac {3}{16 a^4 (a-x)^2}+\frac {1}{16 a^4 (a+x)^2}+\frac {1}{4 a^4 \left (a^2-x^2\right )}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i a^5}{12 d (a-i a \tan (c+d x))^3}-\frac {i a^4}{8 d (a-i a \tan (c+d x))^2}-\frac {3 i a^3}{16 d (a-i a \tan (c+d x))}+\frac {i a^3}{16 d (a+i a \tan (c+d x))}-\frac {\left (i a^3\right ) \operatorname {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \tan (c+d x)\right )}{4 d}\\ &=\frac {a^2 x}{4}-\frac {i a^5}{12 d (a-i a \tan (c+d x))^3}-\frac {i a^4}{8 d (a-i a \tan (c+d x))^2}-\frac {3 i a^3}{16 d (a-i a \tan (c+d x))}+\frac {i a^3}{16 d (a+i a \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.55, size = 116, normalized size = 0.99 \[ \frac {a^2 (-12 i d x \sin (2 (c+d x))+3 \sin (2 (c+d x))+2 \sin (4 (c+d x))+3 (4 d x-i) \cos (2 (c+d x))+i \cos (4 (c+d x))-9 i) (\cos (2 (c+2 d x))+i \sin (2 (c+2 d x)))}{48 d (\cos (d x)+i \sin (d x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 78, normalized size = 0.67 \[ \frac {{\left (24 \, a^{2} d x e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{2} e^{\left (8 i \, d x + 8 i \, c\right )} - 6 i \, a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} - 18 i \, a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} + 3 i \, a^{2}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.11, size = 169, normalized size = 1.44 \[ \frac {96 \, a^{2} d x e^{\left (6 i \, d x + 4 i \, c\right )} + 192 \, a^{2} d x e^{\left (4 i \, d x + 2 i \, c\right )} + 96 \, a^{2} d x e^{\left (2 i \, d x\right )} - 4 i \, a^{2} e^{\left (12 i \, d x + 10 i \, c\right )} - 32 i \, a^{2} e^{\left (10 i \, d x + 8 i \, c\right )} - 124 i \, a^{2} e^{\left (8 i \, d x + 6 i \, c\right )} - 168 i \, a^{2} e^{\left (6 i \, d x + 4 i \, c\right )} - 60 i \, a^{2} e^{\left (4 i \, d x + 2 i \, c\right )} + 24 i \, a^{2} e^{\left (2 i \, d x\right )} + 12 i \, a^{2} e^{\left (-2 i \, c\right )}}{384 \, {\left (d e^{\left (6 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (4 i \, d x + 2 i \, c\right )} + d e^{\left (2 i \, d x\right )}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.52, size = 121, normalized size = 1.03 \[ \frac {-a^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )-\frac {i a^{2} \left (\cos ^{6}\left (d x +c \right )\right )}{3}+a^{2} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.72, size = 92, normalized size = 0.79 \[ \frac {3 \, {\left (d x + c\right )} a^{2} + \frac {3 \, a^{2} \tan \left (d x + c\right )^{5} + 8 \, a^{2} \tan \left (d x + c\right )^{3} + 9 \, a^{2} \tan \left (d x + c\right ) - 4 i \, a^{2}}{\tan \left (d x + c\right )^{6} + 3 \, \tan \left (d x + c\right )^{4} + 3 \, \tan \left (d x + c\right )^{2} + 1}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.37, size = 88, normalized size = 0.75 \[ \frac {a^2\,x}{4}+\frac {\frac {a^2\,{\mathrm {tan}\left (c+d\,x\right )}^3}{4}+\frac {a^2\,{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}}{2}-\frac {a^2\,\mathrm {tan}\left (c+d\,x\right )}{12}+\frac {a^2\,1{}\mathrm {i}}{3}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+{\mathrm {tan}\left (c+d\,x\right )}^3\,2{}\mathrm {i}+\mathrm {tan}\left (c+d\,x\right )\,2{}\mathrm {i}-1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.40, size = 187, normalized size = 1.60 \[ \frac {a^{2} x}{4} + \begin {cases} \frac {\left (- 8192 i a^{2} d^{3} e^{8 i c} e^{6 i d x} - 49152 i a^{2} d^{3} e^{6 i c} e^{4 i d x} - 147456 i a^{2} d^{3} e^{4 i c} e^{2 i d x} + 24576 i a^{2} d^{3} e^{- 2 i d x}\right ) e^{- 2 i c}}{786432 d^{4}} & \text {for}\: 786432 d^{4} e^{2 i c} \neq 0 \\x \left (- \frac {a^{2}}{4} + \frac {\left (a^{2} e^{8 i c} + 4 a^{2} e^{6 i c} + 6 a^{2} e^{4 i c} + 4 a^{2} e^{2 i c} + a^{2}\right ) e^{- 2 i c}}{16}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________